
<!--
All rights Reserved, Designed By www.youyacao.com
@Description:创宇安全配置
@author:成都市一颗优雅草科技有限公司
@version V4.2
注意：本前端源码遵循 MIT开源协议本内容仅限于个人参考，禁止用于其他的商业用途
需要商业用途或者定制开发等可访问songshu.youyacao.com   联系QQ:422108995 23625059584
开源gitee地址：https://gitee.com/youyacao/songshu-video-page
 -->


<template>
  <div>
    <div class="crumbs">
      <el-breadcrumb separator="/">
        <el-breadcrumb-item>
          <i class="el-icon-lx-calendar"></i> 内容安全
        </el-breadcrumb-item>
        <el-breadcrumb-item>护驾卫士</el-breadcrumb-item>
      </el-breadcrumb>
    </div>
    <div class="container">
      <div class="form-box">





            <el-row>
              知道创宇官网：
              <el-link
                :href="'https://secop.yunaq.com/customer/api/v1/public/biz-opp/0/5a9f449545475e77a85657f6'"
                type="primary"
                target="_blank"
              >https://www.knownsec.com/#/</el-link>
              
              使用知道创宇护架卫士产品可以让您远离一切违规信息，让监管内容不再烦恼。
            </el-row>





        <el-form ref="form" :model="form" label-width="100px">
          <el-form-item label="是否启用">
            <el-tooltip class="item" effect="dark" content="启用" placement="top">
              <el-radio v-model="form.cy_status" label="1">启用</el-radio>
            </el-tooltip>
            <el-tooltip class="item" effect="dark" content="关闭" placement="top">
              <el-radio v-model="form.cy_status " label="0">关闭</el-radio>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="客户代码">
            <el-input v-model="form.cy_n"></el-input>
          </el-form-item>
          <el-form-item label="客户密钥">
            <el-input v-model="form.cy_app_key"></el-input>
          </el-form-item>
          <el-form-item label="客户业务编码">
            <el-input v-model="form.cy_customer_code"></el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="onSubmit">提交</el-button>
            <el-button>取消</el-button>
          </el-form-item>
        </el-form>
      </div>
    </div>
  </div>
</template>

<script>
import qs from 'Qs'
export default {
    name: 'baseform',
    data() {
        return {
            form: {
            }
        };
	},
	created(){
		this.getData();
	},
    methods: {
		getData(){
			this.$api.config.get({}).then((res)=>{
				this.form = res.data;
			});
		},
		onSubmit() {
			var data = [];
			for(let item in this.form){
				data[`config[${item}]`]=this.form[item];
			}
			console.log(data);
			this.$api.config.set(qs.stringify(data)).then((res)=>{
				console.log(res.data);
			});
            this.$message.success('提交成功！');
        }
    }
};
</script>
